import request from '@/config/axios'
import {
  IUserListData,
  IUserImport,
  IUserExport,
  IUserManageListData,
  IExclusive,
  IAccountRole,
  IPutPassword,
  IPutPwdReset
} from './types';

const userBaseUrl = 'http://localhost:3000/dev-api/societyApplies'

/**
 * 获取社团审批列表
 */
export const fetchSocietyApplyList = (data: any) => {
  return request.get({ url: `${userBaseUrl}/list`,data })
}

/**
 * 获取学院列表
 */
export const fetchGetMajorList = () => {
  return request.get({ url: `${userBaseUrl}getMajorList` })
}


/**
 * 获取年级列表
 */
export const fetchGetGradeList = () => {
  return request.get({ url: `${userBaseUrl}getGradeList` })
}

// 提交建设申请
export const fetchPostSociety = (data: any): Promise<IResponse> => {
  return request.post({ url: `${userBaseUrl}/create`, data })
}

// 新增社团申请（加入社团/退出社团/社团换届/解散社团）
export const fetchPostJoinSociety = (data: any): Promise<IResponse> => {
  return request.post({ url: `${userBaseUrl}/join`, data })
}